﻿namespace WMS6.Web.Analytics
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class ShippingStatisticalRptQuery : BasePage
    {
        protected Button btnSearch;
        protected DropDownList ddlConsigneeID;
        protected DropDownList ddlDescr;
        protected DropDownList ddlExternOrderID;
        protected DropDownList ddlExternOrderID2;
        protected DropDownList ddlOrderID;
        protected DropDownList ddlOwnerID;
        protected DropDownList ddlSkuClassID;
        protected DropDownList ddlSkuID;
        protected DropDownList ddlType;
        protected HtmlForm F15450;
        protected HtmlInputHidden hdnActionID;
        protected HtmlInputHidden hdncalendarFlag;
        protected HtmlInputHidden hdnDataFormat;
        protected HtmlHead Head1;
        protected Label lblConsigneeID;
        protected Label lblDescr;
        protected Label lblEndDateTime;
        protected Label lblExternOrderID;
        protected Label lblExternOrderID2;
        protected Label lblOrderID;
        protected Label lblOwnerID;
        protected Label lblSkuClassID;
        protected Label lblSkuID;
        protected Label lblStartDateTime;
        protected Label lblType;
        protected HtmlLink mycss;
        protected Label one1;
        protected TextBox txtConsigneeID;
        protected TextBox txtDescr;
        protected TextBox txtEndDateTime;
        protected TextBox txtExternOrderID;
        protected TextBox txtExternOrderID2;
        protected TextBox txtOrderID;
        protected TextBox txtOwnerID;
        protected TextBox txtSkuClassID;
        protected TextBox txtSkuID;
        protected TextBox txtStartDateTime;
        protected TextBox txtType;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer("ShippingStatisticalRptList.aspx", false);
        }

        private void InitDropDownLists()
        {
            base.InitQueryDDL(this.ddlOrderID, 0);
            base.InitQueryDDL(this.ddlExternOrderID, 0);
            base.InitQueryDDL(this.ddlExternOrderID2, 0);
            base.InitQueryDDL(this.ddlOwnerID, 0);
            base.InitQueryDDL(this.ddlType, 0);
            base.InitQueryDDL(this.ddlSkuClassID, 0);
            base.InitQueryDDL(this.ddlSkuID, 0);
            base.InitQueryDDL(this.ddlDescr, 0);
            base.InitQueryDDL(this.ddlConsigneeID, 0);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                this.InitDropDownLists();
            }
        }

        public string ConsigneeID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtConsigneeID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtConsigneeID.Text.Trim(), this.ddlConsigneeID.SelectedValue);
                }
                return "";
            }
        }

        public string Descr
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtDescr.Text.Trim()))
                {
                    return base.GetParamsString(this.txtDescr.Text.Trim(), this.ddlDescr.SelectedValue);
                }
                return "";
            }
        }

        public string EndTime
        {
            get
            {
                return this.txtEndDateTime.Text.Trim();
            }
        }

        public string ExternOrderID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtExternOrderID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtExternOrderID.Text.Trim(), this.ddlExternOrderID.SelectedValue);
                }
                return "";
            }
        }

        public string ExternOrderID2
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtExternOrderID2.Text.Trim()))
                {
                    return base.GetParamsString(this.txtExternOrderID2.Text.Trim(), this.ddlExternOrderID2.SelectedValue);
                }
                return "";
            }
        }

        public string OrderID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtOrderID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtOrderID.Text.Trim(), this.ddlOrderID.SelectedValue);
                }
                return "";
            }
        }

        public string OwnerID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtOwnerID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtOwnerID.Text.Trim(), this.ddlOwnerID.SelectedValue);
                }
                return "";
            }
        }

        public string SkuClassID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSkuClassID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSkuClassID.Text.Trim(), this.ddlSkuClassID.SelectedValue);
                }
                return "";
            }
        }

        public string SkuID
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSkuID.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSkuID.Text.Trim(), this.ddlSkuID.SelectedValue);
                }
                return "";
            }
        }

        public string StartTime
        {
            get
            {
                return this.txtStartDateTime.Text.Trim();
            }
        }

        public string Type
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtType.Text.Trim()))
                {
                    return base.GetParamsString(this.txtType.Text.Trim(), this.ddlType.SelectedValue);
                }
                return "";
            }
        }
    }
}

